<%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2021-11-13
  Time: 10:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>按钮</title>
    <script>
        function  showME(){
            <%
                out.println("alert('你好啊');");
            %>
        }
    </script>
</head>
<body>
<%!
    public static int count=0;//记录jsp的访问次数
    String daxie(String s){
        return s.toUpperCase();
    }
%>
<div>
     <%
         String []ar={"苹果","梨子","葡萄","凤梨","菠萝","桃子","banana"};


     %>
    <ul>
        <%
            for(String s:ar){
        %>
        <li><%=daxie(s)%></li>
        <%}%>
    </ul>
    <h2><%=Math.random()%></h2>
</div>
<p>
    <button value="点击" type="button" onclick="showME()">点击</button>
</p>
</body>
</html>
